﻿// =================================================================== 
// 数据访问层接口层(GDIT.Pattern)
//====================================================================
// 文件：IDepartment.cs
// 项目名称：学院网站
// 创建时间：2012-08-08
// 负责人：ChenZhiGang
//引用DevExpress.Xpo程序集
// 程序集介绍：部门信息数据访问层接口
// ===================================================================
using GDIT.Model;
using DevExpress.Xpo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GDIT.Pattern
{
    public interface IDepartment
    {
        /// <summary>
        /// 增加部门
        /// </summary>
        /// <param name="department">需要新增的部门对象</param>
        /// <returns>1: 更新成功 0：更新失败</returns>
        int InsertDepartment(Mtb_Department department);

        /// <summary>
        /// 删除部门
        /// </summary>
        /// <param name="department">需要删除的部门对象</param>
        /// <returns>1: 更新成功 0：更新失败</returns>
        int DeleteDepartment(Mtb_Department department);

        /// <summary>
        /// 更新部门
        /// </summary>
        /// <param name="department">需要更新的部门对象</param>
        /// <returns>1: 更新成功 0：更新失败</returns>
        int UpdateDepartment(Mtb_Department department);

        /// <summary>
        /// 查询所有的部门
        /// </summary>
        /// <returns>所有部门的列表</returns>
        XPCollection SelectAllDepartment();

        /// <summary>
        /// 查询单一的部门对象
        /// </summary>
        /// <param name="department">需要查询的单一部门对象</param>
        /// <returns>单一部门对象</returns>
        Mtb_Department SelectDepartmentByDepart(Mtb_Department department);
    }
}
